Repository navigation
Add Josephson junction (RCSJ) lumped element (supersedes #152) - #164
Merged
ajnonaka merged 5 commits intoNov 9, 2026
Merged
Conversation
) Resolve conflicts with the lumped R/C implementation merged upstream (AMReX-Microelectronics#141): - MacroscopicProperties.H/.cpp, MacroscopicEvolveE.cpp: take development's version (the PR's changes here were equivalent refactors of the same code). - WarpXInitData.cpp: keep upstream's ordering (london -> lumped elements -> diagnostics), with inductor + Josephson junction InitData before InitDiagnostics and JJ ReadCheckpoint on restart. - WarpX.H/.cpp: keep use_josephson_junction. Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UToDzavtDTwzaLRf56VjXE
Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01UToDzavtDTwzaLRf56VjXE
ajnonaka
merged commit Nov 9, 2026
c1eff20
into
AMReX-Microelectronics:development
10 of 15 checks passed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This carries forward @tyh0123's Josephson junction work from #152. It's rebased on current
development, conflicts are resolved, and stray files are removed.What it adds
This adds a new
JosephsonJunctionlumped element (Source/FieldSolver/LumpedElement/), which acts as a nonlinear inductor on grid edges:J_J = Ic·sin(φ)/A.dφ/dt = (2e/ħ)·V, withV = E_edge·edge_length. It's advanced with leapfrog: a-dt/2initialization push, thendteach step.Jis persistent state in this solver, so each step the junction swaps its previous contribution for the new one instead of adding on top. This fixes the accumulation bug in the last commit of Added JJ function #152, and it works alongside London or inductor current on the same edge.macroscopic.lumped_resistor_*/lumped_capacitor_*inputs (implement lumped capacitor and resistor #141) on the same edges.Inputs
Diagnostics:
josephson_phi_{x,y,z}andjosephson_Ic_{x,y,z}are available as plotfile fields.Checkpoint/restart: φ and the stored supercurrent are written to the checkpoint and read back on restart. Without this, φ would silently reset to 0 while the fields were restored. The junction is also included in the existing London and inductor handling of
Jin checkpoints, current setup andEvolve.Changes from #152
development, including implement lumped capacitor and resistor #141 (lumped R/C), Time varying hbias #158 (time-varying Hbias), fix compilation issues for LLG and non-LLG #161 and fix soft source double counting introduced with time-varying Hbias PR #162.MacroscopicProperties.H/.cppandMacroscopicEvolveE.cppnow use upstream's version unchanged; the only differences were cosmetic.WarpX::InitData: this keeps upstream's ordering, london → inductor → Josephson junction → diagnostics. The lumped elements still set up their data before diagnostics read it, and a restart callsJosephsonJunction::ReadCheckpointright afterInitData..origpatch leftovers, about 2,900 lines.AMREX_HOMEpath change inGNUmakefile.Testing